package com.suda.sudaexamsystem.service.impl;

import com.suda.sudaexamsystem.mapper.QuestionTypeMapper;
import com.suda.sudaexamsystem.pojo.QuestionType;
import com.suda.sudaexamsystem.service.QuestionTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class QuestionTypeServiceImpl implements QuestionTypeService {
    @Autowired
    private QuestionTypeMapper questionTypeMapper;

    @Override
    @Transactional
    public QuestionType findById(int typeId) {
        return questionTypeMapper.findById(typeId);
    }

    @Override
    @Transactional
    public List<QuestionType> findAll() {
        return questionTypeMapper.findAll();
    }
}
